package com.huige.wiki.util;

import org.apache.tomcat.jni.Thread;

import java.io.Serializable;

public class RequestContext implements Serializable {
    private static ThreadLocal<String> remoteAddr = new ThreadLocal<>();

    public static String getRemoteAddr(){
        return RequestContext.remoteAddr.get();
    }

    public static void setRemoteAddr(String remoteAddr){
        RequestContext.remoteAddr.set(remoteAddr);
    }

    public static void removeRemoteAddr() {
        remoteAddr.remove();
    }
}
